Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "service-search-by-queryid">

It allows to retrieve the set of services associated with a query stored using the servicemap user interface.

Inputs

A JSON with these parameters:
queryId string
identifier of the query stored on servicemap (info about QueryId)
lang string
ISO 2 chars language code (e.g. “it”, “en”, “fr”, “de”, “es”) to be used for returned descriptions if available in multiple languages. Currently for languages other than “it” and “en” it returns “en” descriptions. (if parameter is missing “en” is assumed)

Outputs

  1. ServiceUri Array
    Returns an array containing the servicesUri of each service found
  2. GeoJSON Results
    It returns the services split in three sections (BusStops , SensorSites, Services). Each section is provided as GeoJSON “FeatureCollection”, the results are sorted by distance, additionally in each section the “fullCount” property reports the full number of results available matching the query
  3. All services together
    It returns the services merge in Results section

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.